package com.snail.starter.mq.producer;

import com.snail.starter.mq.dto.LocalMessageDTO;
import com.snail.starter.mq.enums.LocalMessageTypeEnum;

/**
 * @author: snail framework
 * @Date: 2023/7/4 11:29
 * @Version: 1.0.0
 */

public interface IMessageProducer {

    boolean supportMessageType(LocalMessageTypeEnum localMessageTypeEnum);

    /**
     * 发送消息通过本地消息表
     *
     * @param localMessageDTO 消息内容
     * @return 是否发送成功
     */
    boolean sendByLocalMessage(LocalMessageDTO localMessageDTO);

    /**
     * 直接发送，不通过本地消息表
     * @param localMessageDTO 消息内容
     * @return 是否发送成功
     */
    boolean send(LocalMessageDTO localMessageDTO);

}